package com.heo.pojo;

import com.heo.util.ByteHelper;

public class StateInfoEntity  extends BaseEntity{

	private static final long serialVersionUID = 1L;
	private String state;
	private String runningProgram;
	private int remainingTime;//
	private String faultState;//终端硬件版本号
	private int signal;
	private String controlState;
	
	public StateInfoEntity(String bodyHex) {
		state = bodyHex.substring(0, 2);
		runningProgram = bodyHex.substring(2, 4);
		remainingTime = ByteHelper.hex16ToInt(bodyHex.substring(4, 6));
		faultState = bodyHex.substring(6, 8);
		signal = ByteHelper.hex16ToInt(bodyHex.substring(8, 10));
		controlState = bodyHex.substring(10, 12);
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getRunningProgram() {
		return runningProgram;
	}

	public void setRunningProgram(String runningProgram) {
		this.runningProgram = runningProgram;
	}

	public int getRemainingTime() {
		return remainingTime;
	}

	public void setRemainingTime(int remainingTime) {
		this.remainingTime = remainingTime;
	}

	public String getFaultState() {
		return faultState;
	}

	public void setFaultState(String faultState) {
		this.faultState = faultState;
	}

	public int getSignal() {
		return signal;
	}

	public void setSignal(int signal) {
		this.signal = signal;
	}

	public String getControlState() {
		return controlState;
	}

	public void setControlState(String controlState) {
		this.controlState = controlState;
	}

}
